(function(){"use strict";if(!!window.JCCatalogSectionListStoreComponent){return}window.JCCatalogSectionListStoreComponent=function(t){this.state={offset:0,itemNumber:0};this.settings={offset:0,maxCount:0};this.visual={id:""};this.offsetMode=t.offsetMode||"N";this.visual.id=t.visual.id;if(this.offsetMode==="F"){this.settings.offset=t.settings.offset}this.settings.maxCount=t.settings.maxCount;this.container=null;BX.ready(BX.proxy(this.init,this))};window.JCCatalogSectionListStoreComponent.prototype={init:function(){if(BX.type.isNotEmptyString(this.visual.id)){this.container=BX(this.visual.id);var t=new BX.UI.Ears({container:this.container.children[0],smallSize:true,noScrollbar:true,className:"catalog-sections-list-ears"});t.init()}if(this.offsetMode==="F"){this.setCurrentOffset(this.settings.offset)}},setCurrentOffset:function(t){this.calculateOffset(t);this.applyOffset()},calculateOffset:function(t){this.state.offset=t;this.state.itemNumber=Math.floor(this.state.offset/5)},applyOffset:function(){if(this.container!==null){var t=this.container.querySelector('[data-items-container="Y"]');if(BX.type.isElementNode(t)){var e=t.querySelector('[data-item-number="'+this.state.itemNumber+'"]');if(BX.type.isElementNode(e)){BX.adjust(e,{attrs:{"data-role":"ui-ears-active"}})}}}}}})();
//# sourceMappingURL=script.map.js